package com.ds.infrastructure.hyperspace.console.model.response.diagram;

import com.ds.infrastructure.hyperspace.console.entity.table.TbNodeMetrics;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: yaozhendong
 * @create: 2019-11-15 16:21
 **/
@Data
@NoArgsConstructor
public class HeatMapChart {
    private Long xAxis;
    private Long yAxis;
    private String tag;

    public static HeatMapChart toVO(TbNodeMetrics metrics) {
        HeatMapChart chart = new HeatMapChart();
        chart.setXAxis(metrics.getExecuteTime());
        chart.setYAxis(metrics.getMetricsRealValue());
        chart.setTag(metrics.getServiceExtend1());
        return chart;
    }
}
